Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify two colorbar tests and remove all others #2981

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Conversation

seisman
Copy link
Member

@seisman seisman commented Jan 10, 2024

See #2961 (comment) for context.

This PR removes all existing colorbar tests and add a new, simpler one.

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Jan 10, 2024
@seisman seisman added this to the 0.11.0 milestone Jan 10, 2024
Comment on lines 60 to 67
@pytest.mark.mpl_image_compare
def test_colorbar_shading_list():
"""
Create colorbar and set shading by passing the high/low values as a list.
"""
fig = Figure()
fig.basemap(region=[0, 10, 0, 10], projection="X15c", frame="a")
fig.colorbar(cmap="geo", shading=[-0.7, 0.2], frame=True)
Copy link
Member

@weiji14 weiji14 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe keep this one that checks that shading works (implemented in #752/#1143). This colorbar is a little more special since it has a gradient effect.

Copy link
Member Author

@seisman seisman Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, added it back but changed the projection to X8c to have a smaller image size.

Copy link
Contributor

github-actions bot commented Jan 10, 2024

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
added pygmt/tests/baseline/test_colorbar.png
deleted pygmt/tests/baseline/test_colorbar_box.png
deleted pygmt/tests/baseline/test_colorbar_box_with_fill.png
deleted pygmt/tests/baseline/test_colorbar_scaled_z_values.png
deleted pygmt/tests/baseline/test_colorbar_shading_boolean.png
deleted pygmt/tests/baseline/test_colorbar_truncated_to_zlow_zhigh.png
modified pygmt/tests/baseline/test_colorbar_shading_list.png

Image diff(s)

Added images

  • test_colorbar.png

Modified images

Path Old New
test_colorbar_shading_list.png

Report last updated at commit c35e2d7

@seisman seisman mentioned this pull request Jan 10, 2024
14 tasks
@michaelgrund michaelgrund added the final review call This PR requires final review and approval from a second reviewer label Jan 10, 2024
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little uncomfortable removing these tests, but ok then. Just one optional suggestion, and make sure to update the title before merge.

pygmt/tests/test_colorbar.py Outdated Show resolved Hide resolved
@seisman seisman changed the title Add a simple colorbar test and remove all others Simplify two colorbar tests and remove all others Jan 11, 2024
@seisman seisman merged commit 344bdb1 into main Jan 11, 2024
8 of 14 checks passed
@seisman seisman deleted the baseline/colorba branch January 11, 2024 02:50
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants